<script setup>
import { ref } from 'vue'
import { useRouter } from 'vue-router'
import { useI18n } from 'vue-i18n'
import api from '@/apis'
const router = useRouter()
const { t } = useI18n()
const show = ref(false)
const toPay = ()=>{
  show.value = true
}
</script>
<template>
  <div class="container pt-36px relative">
    <div class="relative z-1">
      <div class="px-110">
        <img src="/src/assets/imgs/node/top_text.png" class="w-100%" />
      </div>
      <div class="text">x Home限量发售</div>
      <div class="text-[34px] text-[#fff] font-400 font-pingfang text-center mt-8px">
        — 稀缺性由你见证 —
      </div>
      <div class="swiper mt-394px">
        <van-swipe :loop="false" :width="320">
          <van-swipe-item v-for="(item, index) in 3" :key="index">
            <div :class="['bg-[#282828] rounded-[40px] px-44 py-44 mb-40', 'mr-30px']">
              <div class="flex items-center">
                <img src="/src/assets/icon/node/crown.png" class="w-48 h-48" />
                <div class="text-[#fff] text-[34px] font-900 font-source uppercase ml-10">
                  黄金节点
                </div>
              </div>
              <div class="mt-16px">
                <span class="text-[#fff] text-[70px] font-700 font-source uppercase">1000</span>
                <span class="text-[#fff]/54 text-[44px] font-900 font-source uppercase">/usdt</span>
              </div>
              <div class="flex mt-26px">
                <div
                  class="tag text-[24px] text-[#0D1100] font-700 font-source uppercase px-30 py-8"
                >
                  限量800个
                </div>
              </div>
              <div
                class="text-[26px] text-[#FFFFFF] font-400 font-pingfang line-height-70px mt-36px"
              >
                节点权益：
              </div>
              <div class="flex flex-col">
                <div class="flex items-center">
                  <svg
                    xmlns="http://www.w3.org/2000/svg"
                    width="20"
                    height="20"
                    viewBox="0 0 42 42"
                    fill="none"
                  >
                    <path
                      d="M2.59314 20.9999C2.59314 20.9999 12.0992 28.7759 13.0435 35.3892C13.0435 35.3892 25.5084 14.9843 39.3584 13.1586C39.3584 13.1586 35.1405 10.0847 36.5254 5.22632C36.5254 5.22632 28.845 5.9927 14.3656 28.4673L7.57945 16.9481L2.59314 20.9999Z"
                      fill="#00E153"
                    />
                  </svg>
                  <div
                    class="text-[24px] text-[#FFFFFF] font-400 font-pingfang line-height-70px ml-16px"
                  >
                    入金后送200U比特币
                  </div>
                </div>
                <div class="flex items-center">
                  <svg
                    xmlns="http://www.w3.org/2000/svg"
                    width="20"
                    height="20"
                    viewBox="0 0 42 42"
                    fill="none"
                  >
                    <path
                      d="M2.59314 20.9999C2.59314 20.9999 12.0992 28.7759 13.0435 35.3892C13.0435 35.3892 25.5084 14.9843 39.3584 13.1586C39.3584 13.1586 35.1405 10.0847 36.5254 5.22632C36.5254 5.22632 28.845 5.9927 14.3656 28.4673L7.57945 16.9481L2.59314 20.9999Z"
                      fill="#00E153"
                    />
                  </svg>
                  <div
                    class="text-[24px] text-[#FFFFFF] font-400 font-pingfang line-height-70px ml-16px"
                  >
                    奖励300个百倍币代币
                  </div>
                </div>
                <div class="flex items-center">
                  <svg
                    xmlns="http://www.w3.org/2000/svg"
                    width="20"
                    height="20"
                    viewBox="0 0 42 42"
                    fill="none"
                  >
                    <path
                      d="M2.59314 20.9999C2.59314 20.9999 12.0992 28.7759 13.0435 35.3892C13.0435 35.3892 25.5084 14.9843 39.3584 13.1586C39.3584 13.1586 35.1405 10.0847 36.5254 5.22632C36.5254 5.22632 28.845 5.9927 14.3656 28.4673L7.57945 16.9481L2.59314 20.9999Z"
                      fill="#00E153"
                    />
                  </svg>
                  <div
                    class="text-[24px] text-[#FFFFFF] font-400 font-pingfang line-height-70px ml-16px"
                  >
                    上线后拿全网进单门票币10%平分永久性
                  </div>
                </div>
              </div>
              <div
                class="mt-46px bg-[#F76938] rounded-[20px] h-92 text-[26px] text-[#FFFFFF] font-700 font-source uppercase text-center line-height-92px van-haptics-feedback"
                @click="toPay"
              >
                认购
              </div>
            </div>
          </van-swipe-item>
          <template #indicator="{ active, total }">
            <div class="custom-indicator flex items-center gap-10px">
              <div
                :class="[
                  'w-60 h-8 rounded-[8888px]',
                  active == index ? 'bg-[#fff]' : 'bg-[#FFFFFF80]'
                ]"
                v-for="(value, index) in total"
              ></div>
            </div>
          </template>
        </van-swipe>
      </div>
    </div>
    <div class="absolute top-114px left-0 w-100%">
      <img src="/src/assets/imgs/node/top_bg.png" class="w-100%" />
    </div>
    <van-popup v-model:show="show" round closeable position="bottom">
      <div class="bg-[#272727] py-36 px-30">
        <div class="text-[32px] text-[#fff] font-800 font-roboto">认购</div>
        <div class="text-[24px] text-[#fff]/50 font-400 font-roboto mt-16px">认购黄金节点</div>
        <div class="h-2 bg-[#fff]/10 mt-24px"></div>
        <div class="text-[24px] text-[#fff]/50 font-400 font-roboto mt-34px">金额</div>
        <div class="mt-34px">
          <span class="text-[44px] text-[#fff] font-900 font-roboto">0.00</span>
          <span class="text-[28px] text-[#fff] font-900 font-roboto"> X</span>
        </div>
        <div
          class="flex items-center justify-between px-22 py-24 rounded-[20px] mt-30px bg-[#000000]"
        >
          <div class="flex items-center">
            <img src="/src/assets/icon/public/logo_full.png" class="w-60 h-60" />
            <div class="ml-20">
              <div class="text-[28px] text-[#fff] font-400 font-pingfang">X</div>
              <div class="text-[24px] text-[#fff]/50 font-900 font-roboto uppercase mt-6px">
                余额：0
              </div>
            </div>
          </div>
          <div class="flex items-center justify-center">
            <svg
              xmlns="http://www.w3.org/2000/svg"
              width="20"
              height="20"
              viewBox="0 0 38 38"
              fill="none"
            >
              <path
                d="M18.9871 0C8.5008 0 0 8.50088 0 18.9871C0 29.4735 8.5008 37.9743 18.9871 37.9743C29.4734 37.9743 37.9743 29.4735 37.9743 18.9871C37.9743 8.50084 29.4734 0 18.9871 0ZM29.3986 13.6174L16.644 26.372C16.3654 26.6506 15.9978 26.7878 15.6306 26.7861C15.2634 26.7878 14.8958 26.6506 14.6172 26.372L8.57561 20.3303C8.02179 19.7765 8.02179 18.8702 8.57561 18.3165C9.12943 17.7626 10.0357 17.7626 10.5895 18.3165L15.6306 23.3575L27.3847 11.6035C27.9385 11.0496 28.8447 11.0496 29.3986 11.6035C29.9524 12.1573 29.9524 13.0636 29.3986 13.6174Z"
                fill="#00E153"
              />
            </svg>
          </div>
        </div>
        <div class="bg-[#F76938] rounded-[20px] h-84 text-[30px] text-[#fff] font-source font-700 line-height-84px text-center mt-30px van-haptics-feedback">立即支付</div>
      </div>
    </van-popup>
  </div>
</template>
<style lang="scss" scoped>
.van-hairline--surround {
  padding: 6px 10px;
  border-radius: 6px;
}

.container {
  width: 100%;
  min-height: 100vh;
  background: #101010;
}
.text {
  color: #fff;
  text-align: center;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  font-family: 'Source Han Sans CN';
  font-size: 79px;
  font-style: normal;
  font-weight: 900;
  line-height: normal;
  text-transform: uppercase;
}
.tag {
  border-radius: 1111px;
  background: linear-gradient(274deg, #ffd9a4 2.67%, #fff 85.21%);
}
.custom-indicator {
  position: absolute;
  z-index: 10;
  left: 50%;
  bottom: -0px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.1);
}
</style>
